package com.sinosoft.dsp.component.bpm.viewbean.activity.part;

import java.util.ArrayList;
import java.util.List;

import com.sinosoft.dsp.component.bpm.viewbean.BpmEventObject;
import com.sinosoft.dsp.component.bpm.viewbean.activity.BpmAbstractActivityPartEditViewBean;
import com.sinosoft.dsp.component.bpm.viewbean.activity.IBpmActivityPartEditViewBean;

public class BpmActivityAdvanceViewBean extends
		BpmAbstractActivityPartEditViewBean implements
		IBpmActivityPartEditViewBean {

	private List<BpmEventObject> activityEvents = new ArrayList<BpmEventObject>();

	private BpmEventObject[] selectedEventRows;

	public List<BpmEventObject> getActivityEvents() {
		return activityEvents;
	}

	public void setActivityEvents(List<BpmEventObject> activityEvents) {
		this.activityEvents = activityEvents;
	}

	public void addActivityEvent() {
		this.activityEvents.add(new BpmEventObject());
	}

	public void removeActivityEvents() {
		if (selectedEventRows != null && selectedEventRows.length > 0) {
			for (BpmEventObject a : selectedEventRows) {
				this.activityEvents.remove(a);
			}
		}
	}

	public BpmEventObject[] getSelectedEventRows() {
		return selectedEventRows;
	}

	public void setSelectedEventRows(BpmEventObject[] selectedEventRows) {
		this.selectedEventRows = selectedEventRows;
	}

}
